//
//  NEDFormItem+Add.h
//  NEDFormView_Example
//
//  Created by 000 on 2022/1/8.
//  Copyright © 2022 000. All rights reserved.
//

#import "NEDFormItem.h"

NS_ASSUME_NONNULL_BEGIN

@interface NEDFormItem (Add)

/// MARK: - left right center

// 先调用 创建相应位置的视图
- (NEDFormItem *(^)(NEDFormContentShowType showType))initLeft;
- (NEDFormItem *(^)(NEDFormContentShowType showType))initRight;
- (NEDFormItem *(^)(NEDFormContentShowType showType))initCenter;

// 调动NEDFormContentItem+Add 中方法回到NEDFormItem
- (NEDFormContentItem *)left;
- (NEDFormContentItem *)center;
- (NEDFormContentItem *)right;

/// MARK: - init view 如需自定义创建视图

- (void)initViewLeftBlock:(NEDFormContentInitViewBlock)initView;
- (void)initViewRightBlock:(NEDFormContentInitViewBlock)initView;
- (void)initViewCenterBlock:(NEDFormContentInitViewBlock)initView;

/// MARK: - style

- (void)styleLeftBlock:(NEDFormContentViewBlock)style;
- (void)styleRightBlock:(NEDFormContentViewBlock)style;
- (void)styleCenterBlock:(NEDFormContentViewBlock)style;

/// MARK: - show

- (void)showLeftBlock:(NEDFormContentViewBlock)show;
- (void)showRightBlock:(NEDFormContentViewBlock)show;
- (void)showCenterBlock:(NEDFormContentViewBlock)show;

/// MARK: - available

- (void)availableLeftBlock:(NEDFormContentAvailableBlock)available;
- (void)availableRightBlock:(NEDFormContentAvailableBlock)available;
- (void)availableCenterBlock:(NEDFormContentAvailableBlock)available;

/// MARK: - click

- (void)clickLeftBlock:(NEDFormContentViewBlock)click;
- (void)clickRightBlock:(NEDFormContentViewBlock)click;
- (void)clickCenterBlock:(NEDFormContentViewBlock)click;


/// MARK: - get view 获取相应的视图

- (UIView * _Nullable)leftView;
- (UIView * _Nullable)rightView;
- (UIView * _Nullable)centerView;

///// MARK: - 定义 right view
//
///// 显示右侧箭头
//- (NEDFormItem *)showRightArrow;


/// MARK: - layout

- (NEDFormItem *(^)(CGFloat hegiht))height;
/// 左边视图宽度 中间的自己适配
- (NEDFormItem *(^)(CGFloat width))widthLeft;
/// 右边视图宽度 中间的自己适配
- (NEDFormItem *(^)(CGFloat width))widthRight;
- (NEDFormItem *(^)(CGFloat space))marginLeft;
- (NEDFormItem *(^)(CGFloat space))marginRight;

- (NEDFormItem *(^)(UIColor * color))backgroundColor;

- (NEDFormItem *(^)(NSInteger type))bindType;

/// MARK: -

- (void)configLayout:(void(^)(NEDFormSectionLayout * layout))layoutConfig;

- (NEDFormItem *)showLineTop;
- (NEDFormItem *)hiddenLineBottom;
- (NEDFormItem *)showRightArrow;

@end


@interface NEDFormContentItem (Add)

- (NEDFormItem *(^)(NSString * title))title;
- (NEDFormItem *(^)(NSString * imageURL))imageURL;
- (NEDFormItem *(^)(BOOL isOn))isOn;
- (NEDFormItem *(^)(id dataInfo))linkDataInfo;

@end

NS_ASSUME_NONNULL_END
